home *** CD-ROM | disk | FTP | other *** search
- Path: svnews.ubinet.ubs.com!ubszh!ian.johnston@ubs.com
- From: ian.johnston@ubs.com (Ian Johnston (by ubsswop))
- Newsgroups: comp.lang.c++
- Subject: Re: Why don't you use garbage collection
- Date: 17 Apr 1996 13:06:17 GMT
- Organization: UBS
- Distribution: world
- Message-ID: <4l2qc9$oek@ubszh.fh.zh.ubs.com>
- References: <AD94A731966836BF@dialup97-6-14.swipnet.se> <1996Apr16.110526.1846@ittpub> <AD9A9E819668CB68B@dialup100-3-15.swipnet.se>
- NNTP-Posting-Host: nol2179.fh.zh.ubs.com
-
- In article <AD9A9E819668CB68B@dialup100-3-15.swipnet.se>, lars.farm@nts.mh.se (Lars Farm) writes:
- |> In article <1996Apr16.110526.1846@ittpub>,
- |> wil@ittpub.nl (Wil Evers) wrote:
- |>
- |> >OK, let's get serious about this:
- |> >
- |> >1. Don't we think C++ is complex enough as it is?
- |>
- |> See the Detlefs/Ellis GC proposal. Seems a fairly small change in the
- |> language compared to what is done with templates and exceptions and rtti,
- |> and... A couple of keywords: gc/nogc to be used optionally with class
- |> declarations and optionally with operator new to select collected or non
- |> collected heap. Later gc/nogc overrides previous. There is a way to
- |> finalize, but the need for this is made much smaler. What is inside most
- |> copy/op=/dtors? Code to copy heap data and release data held by pointers.
- |> What would copy/op=/dtors look like when pointers can be shared and you
- |> don't have to say delete? Many of them would become redundant! The
- |> (current) compiler generated op= and copy would very often suffice. The
- |> minority of objects with non empty dtors would be deleted manually just
- |> like now. This makes things simpler, not harder.
-
- Well, most of your classes may manage memory in ctors/dtors/op =, but
- I have many many classes which manage other resources, not memory. In fact,
- the classes I have which manage memory are in the minority.
-
- So, how does the Detlefs/Ellis, or any other GC, finalise my non-memory
- resources?
-
- Ian
-